from celery import Celery
import os
# 设置django运行所依赖的环境变量
if not os.environ.get('DJANGO_SETTINGS_MODULE'):
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ihome.settings.dev')
import django
django.setup()
celery_app = Celery('demo')
celery_app.config_from_object('celery_tasks.config')

celery_app.autodiscover_tasks(['celery_tasks.sms',])

# 发送邮件
